﻿@model Presentation.Web.Client.Areas.PartnersManagement.Models.PartnersListViewModel
@{
    ViewBag.Title = "PartnersList";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<!-- Control Panel -->
<div id="controlPanel">
    @Html.Partial("ControlPanel", Model.ControlPanelActions)
</div>
<div id="sepatateBorder">
</div>
<!-- Main content -->
<div id="mainContent">
    @*<p>
    @Html.ActionLink("Create New", "Create")
</p>*@
    <table>
        <tr>
            <th>
            </th>
            <th>
                Code
            </th>
            <th>
                Name
            </th>
            <th>
                Is Person
            </th>
            <th>
                Total Purchases
            </th>
            <th>
                Fiscal Code
            </th>
        </tr>
        @foreach (var item in Model.PartnersList)
        {
            <tr>
                <td>
                    @Html.ActionLink("Edit", "Edit", new { id = item.Code }) |
                    @Html.ActionLink("Delete", "Delete", new { id = item.Code })
                </td>
                <td>
                    @item.Code
                </td>
                <td>
                    @item.Name
                </td>
                <td>
                    @item.IsPerson
                </td>
                <td>
                    @String.Format("{0:F}", item.TotalPurchases)
                </td>
                <td>
                    @item.FiscalCode
                </td>
            </tr>
        }
    </table>
</div>
